
import instance from '@/request/request'
//添加专家信息
export const addExpertInfoApi=(data)=> {
  return instance({
    url: "/api/expert/addExpert",
    method: 'post',
    data
  })
}
/**
 * 修改专家信息
 * @param data
 * @returns {*}
 */
export const updateExpertInfoApi=(data)=> {
  return instance({
    url: "/api/expert/updateExpert",
    method: 'put',
    data
  })
}
/**
 * 分页查询专家信息
 * @param param
 * @returns {*}
 * @constructor
 */
export const GetExpertPageApi=(param)=> {
  return instance({
    url: `/api/expert/getExpertPage`,
    method: 'get',
    params:param
  })
}

/**
 * 获取专家信息
 * @returns {*}
 * @constructor
 * @param id
 */
export const getExpertInfoById=(id)=> {
  return instance({
    url: `/api/expert/getExpertInfoById/${id}`,
    method: 'get',
  })
}
/**
 * 删除专家信息
 * @param ids
 * @returns {*}
 * @constructor
 */
export  const  DeleteExpertsApi=(ids)=>{
  return instance({
    url: `/api/expert/deleteExperts`,
    method: 'delete',
    params:{ids}
  })
}
export const selectByName = (name) => {
  return instance({
    url: `/api/expert/selectByName`,
    method: 'get',
    params:{name}
  })
}
export const selectByUserId = (id) => {
  return instance({
    url: `/api/expert/selectByUserId/${id}`,
    method: 'get',
  })
}
